
<div class="panel">
    <div class="panel-heading">
        员工
    </div>
    <div class="panel-body">
        <div class="row">
            <div class="col-lg-10">
                <form class="form-horizontal" method="post" id="editForm">

                    <div class="form-group">
                        <label class="col-sm-2">用户名：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="username" placeholder="登录系统的用户名">
                        </div>
                        <label class="col-sm-2">密码：</label>
                        <div class="col-sm-4">
                            <input type="password" class="form-control" name="passwords" placeholder="登录密码，更新时留空则不修改">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2">用户权限：</label>
                        <div class="col-sm-2">
                            <select name="role_id" class="mySelect" style="width: 100%">
                                <?=\app\admin\model\Role::option_member()?>
                            </select>
                        </div>
                        <label class="col-sm-2">用户类别：</label>
                        <div class="col-sm-2">
                            <{tmdTag:select name='type' optname='member_type' /}>
                        </div>
                        <label class="col-sm-2">上级领导：</label>
                        <div class="col-sm-2">
                            <select name="pid" class="mySelect" style="width: 100%">
                                <?=\app\member\model\Member::option_pids()?>
                            </select>
                        </div>
                    </div>

                    <hr/>

                    <div class="form-group">
                        <label class="col-sm-2">姓名：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="realname">
                        </div>
                        <label class="col-sm-2">照片：</label>
                        <div class="col-sm-4">
                            <{tmdTag:upimg name='photo' /}>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2">性别：</label>
                        <div class="col-sm-4">
                            <{tmdTag:select name='gender' optname='gender' /}>
                        </div>
                        <label class="col-sm-2">生日：</label>
                        <div class="col-sm-4">
                            <{tmdTag:date name='birthday' /}>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2">备注说明：</label>
                        <div class="col-sm-10">
                            <{tmdTag:editor name="remark" /}>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <input type="hidden" name="uid">
                            <button type="submit" class="btn btn-primary">保存</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>

<script>
    $('#editForm').myForm();
    
    // <?php if ($editData) { ?> //
    var editData = <?=json_encode($editData, JSON_UNESCAPED_UNICODE)?>;
    $('#editForm').myFormData(editData);
    // <?php } ?> //

</script>